define([ "PDUtilDir/grid", "PDUtilDir/searchBlock" ], function(Grid,
		SearchBlock) {

	function init(cache, detailObj, searchObj) {
		SearchBlock.init('searchBlockId');
		// 初始化
		return Grid({
			id : "SoptTicketSearchGirdDivId",
			pageSize : 10,
			index : true,
			multi : true,
			pagination : true,
			cache : false,
			layout : [ {
                name : "景点名称",
                field : "spotName",
                width : "10%",
                click : function(e) {
                    updateObj.run(e.data.row);
                }
            }, {
				name : "供应商",
				field : "gDeptName",
				click : function(e) {
					detailObj.run(e.data.row);
				}
			}, {
				name : "数量",
				field : "quantity",
				sort : true,
				click : function(e) {
					// console.info(e.data.row);
					detailObj.run(e.data.row);
				}
			}, {
				name : "金额",
				field : "totalAmount"
			}, {
				name : "创建时间",
				field : "createTime"
			} ],
			toolbar : [{
				name : "查询",
				icon : "fa fa-search",
				callback : function(event) {
					searchObj.run();
				}
			} ],
			data : {
				type : "URL",
				value : getServer() + "/flea/hclv/ticket/sell/order/selectSellOrderInfo.htmls"
			}
		});
	}
	return {
		init : init
	}
});